import request from "@/utils/request.js";
import {useTokenStore} from "@/stores/token.js";

//所有房屋查询
export const housesListService = (params) => {
    return request.post('/houses/list', params);
};

export const getHouse = (params) => {
    return request.post('/houses/selectId', params);
};
//房屋明细查询
export const getHouseItem = (params) => {
    return request.post('/housesItem/selectItem', params);
};
//卖房信息
export const BuyhousesListService = (params) => {
    return request.post('/houses/buylist', params);
};
//客户卖房信息
export const BuyhousesCusListService = (params) => {
    return request.post('/houses/buyCuslist', params);
};
//客户租房信息
export const ReshousesCusListService = (params) => {
    return request.post('/houses/resCuslist', params);
};
//租房信息
export const ReshousesListService = (params) => {
    return request.post('/houses/reslist', params);
};
//添加
export const addHouseService=(addHousesData)=>{
    return request.post('/houses/add',addHousesData)
}
export const addLanHouseService=(addHousesData)=>{
    return request.post('/houses/addLanHouse',addHousesData)
}
//修改
export const updateHouseService=(updateHousesData)=>{
    return request.put('/houses/update',updateHousesData)
}
//删除
export const deleteHouseService=(id)=>{
    return request.delete('/houses/delete?id='+id)
}
//修改所有
export const updateHouse=(updateHousesAllData)=>{
    return request.post('/houses/ItemAllupdate',updateHousesAllData)
}
//发起委托
export const weituoOKService=(weituoOKData)=>{
    return request.post('/houses/weituoOK',weituoOKData)
}
//下架
export const downHouseService=(updateHousesData)=>{
    return request.post('/houses/downHouse',updateHousesData)
}
